From 84125f132580b0e732ae34d46e284208baa1b080 Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Thu, 12 Feb 2009 12:12:30 +0000 Subject: [PATCH] =?utf8?q?Bug=20568571=20=E2=80=93=20Asian=20am/pm=20forma?= =?utf8?q?t=20on=20cups=20print=20backend's=20time=20parsing?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 2009-02-12 Marek Kasik Bug 568571 – Asian am/pm format on cups print backend's time parsing * modules/printbackends/cups/gtkprintbackendcups.c: Add Asian am/pm format into formats recognized by CUPS backend svn path=/trunk/; revision=22319 --- ChangeLog | 7 +++++++ modules/printbackends/cups/gtkprintbackendcups.c | 12 ++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2f4f1b0e18..77a3dea859 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-02-12 Marek Kasik + + Bug 568571 – Asian am/pm format on cups print backend's time parsing + + * modules/printbackends/cups/gtkprintbackendcups.c: Add Asian am/pm + format into formats recognized by CUPS backend + 2009-02-11 Matthias Clasen Bug 570824 – [a11y] TreeView is not keyboard (re)focusable after diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c index 51dcc39ab3..0d2975f197 100644 --- a/modules/printbackends/cups/gtkprintbackendcups.c +++ b/modules/printbackends/cups/gtkprintbackendcups.c @@ -3529,16 +3529,20 @@ supports_am_pm (void) return length != 0; } -/* Converts local time to UTC time. Local time has to be in HH:MM format or - * in HH:MM:SS format or in HH:MM:SS {am, pm} format or in HH:MM {am, pm} format - * or in HH {am, pm} format. +/* Converts local time to UTC time. Local time has to be in one of these + * formats: HH:MM:SS, HH:MM, HH:MM:SS {am, pm}, HH:MM {am, pm}, HH {am, pm}, + * {am, pm} HH:MM:SS, {am, pm} HH:MM, {am, pm} HH. * Returns a newly allocated string holding UTC time in HH:MM:SS format * or NULL. */ gchar * localtime_to_utctime (const char *local_time) { - const char *formats_0[] = {" %I : %M : %S %p ", " %H : %M : %S ", " %I : %M %p ", " %H : %M ", " %I %p "}; + const char *formats_0[] = {" %I : %M : %S %p ", " %p %I : %M : %S ", + " %H : %M : %S ", + " %I : %M %p ", " %p %I : %M ", + " %H : %M ", + " %I %p ", " %p %I "}; const char *formats_1[] = {" %H : %M : %S ", " %H : %M "}; const char *end = NULL; struct tm *actual_local_time; -- 2.30.2